#define _CRT_SECURE_NO_WARNINGS 1
#include "Heap.h"

void printArray(int* array, int arraySize) {
	assert(array);
	printf("[ ");
	int i = 0;
	for (i = 0; i < arraySize; i++) {
		printf("%d", array[i]);
		if (i < arraySize - 1) {
			printf(", ");
		}
	}
	printf(" ]\n");
}

int main() {
	Heap heap;
	HeapInit(&heap);

	int nums[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
	int numsSize = sizeof(nums) / sizeof(nums[0]);

	int i = 0;
	for (i = 0; i < numsSize; i++) {
		HeapPush(&heap, nums[i]);
	}

	printArray(heap.data, heap.size);

	HeapPop(&heap);
	printArray(heap.data, heap.size);

	DestroyHeap(&heap);
	return 0;
}